package plugin;

/**
 * Interface of plugins
 * @author zem
 */
public interface PluginInterface {
    /**
     * Check if plugin need parameters to run
     * @return true if need start parameters
     */
    public boolean hasParameters();
    /**
     * Get parameter names
     * @return array of parameters names;
     */
    public String[] ParameterNames();
    /**
     * Get group names
     * @return array of group names;
     */
    public String[] GroupNames();
    /**
     * Get parameter names for each group
     * Example: String[0][0]="USER"; String[0][1]="PASSWORD";
     * This mean that for group with index 0 parameters will be USER and PASSWORD
     * @return array of group parameters
     */
    public String[][] GroupParameterNames();
    /**
     *  Getting info about plugin
     */
    public String About();
    
    /**
     * Check if plugin crashed while running
     * @return true if crashed
     */
    public boolean Crashed();
    /**
     * Get error which lead to crash
     * @return crash error
     */
    public String CrashError();
    /**
     * Start plugin
     */
    public void Start();
    /**
     * Stop plugin
     */
    public void Stop();

    /**
     * Input plugin parameters
     * @param Plugin_String_parameter Plugin parameters
     * @param Plugin_Group_String_parameter Plugin group parameters
     * @return true if successfully input
     */
    public void InputParameters(String[][] Plugin_String_parameter,String[][][][] Plugin_Group_String_parameter);
}
